! Sample modern Fortran program for testing
program test_program
    use iso_fortran_env, only: real64
    use sample_module
    implicit none
    
    real(real64) :: x, y, result
    integer :: i
    
    x = 1.0_real64
    y = 2.0_real64
    
    call initialize_data()
    result = calculate_sum(x, y)
    
    do i = 1, 10
        call process_value(real(i, real64))
    end do
    
    call finalize()
    
contains
    
    subroutine initialize_data()
        implicit none
        write(*,*) 'Initializing data'
    end subroutine initialize_data
    
    function calculate_sum(a, b) result(sum_result)
        implicit none
        real(real64), intent(in) :: a, b
        real(real64) :: sum_result
        
        sum_result = a + b
        call log_calculation('sum', sum_result)
    end function calculate_sum
    
    subroutine process_value(val)
        implicit none
        real(real64), intent(in) :: val
        real(real64) :: processed
        
        processed = val * 2.0_real64
        call store_result(processed)
    end subroutine process_value
    
end program test_program